<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.20.0/axios.min.js"></script>
<script>
    var p1 = new Promise((resolve,reject)=>{
        setTimeout(()=>{
            resolve("p1 成功了")
        },3000)
    })

    var p2 = new Promise((resolve,reject)=>{
        setTimeout(()=>{
            resolve("p2 成功了")
        },4000)
    })
    /*axios.all([p1,p2,Promise.resolve("xxx")]).then(axios.spread((a,b,c)=>{
        console.log(a,b,c)
    }),(error)=>{
        console.log(error,"error");
    })*/


    ;(async function () {
        const [a,b,c] = await axios.all([p1,p2,Promise.resolve("xxx")])
        console.log(a,b,c);
    })()
</script>
</html>